#import <CoreData/CoreData.h>

@class RNItem;
@class RNAisle;
@class RNListItem;
@class RNList;

@interface RNCategory :  NSManagedObject  {}

@property (retain) NSString * title;
@property (retain) NSSet* items;
@property (retain) RNCategory * parentCategory;
@property (retain) NSSet* subcategories;
@property (retain) NSSet* aisles;
@property (retain) NSSet* listItems;

+(BOOL)showsChildren;
+(void)setShowsChildren:(BOOL)shouldShowChildren;
//+(void)setCurrentListObject:(id)object;
//+(id)currentListObject;
+(void)filterWithObject:(NSManagedObject *)filterObject;

-(NSNumber *)itemsCount;
-(BOOL)isLeaf;

@end

@interface RNCategory (CoreDataGeneratedAccessors)
- (void)addItemsObject:(RNItem *)value;
- (void)removeItemsObject:(RNItem *)value;
- (void)addItems:(NSSet *)value;
- (void)removeItems:(NSSet *)value;

- (void)addSubcategoriesObject:(RNCategory *)value;
- (void)removeSubcategoriesObject:(RNCategory *)value;
- (void)addSubcategories:(NSSet *)value;
- (void)removeSubcategories:(NSSet *)value;

- (void)addAislesObject:(RNAisle *)value;
- (void)removeAislesObject:(RNAisle *)value;
- (void)addAisles:(NSSet *)value;
- (void)removeAisles:(NSSet *)value;

- (void)addListItemsObject:(RNListItem *)value;
- (void)removeListItemsObject:(RNListItem *)value;
- (void)addListItems:(NSSet *)value;
- (void)removeListItems:(NSSet *)value;

@end

